#!/usr/bin/python3
#import hashlib
#import requests
#import json
#import uuid

import testbase

#hostIP = "http://127.0.0.1:18866"
#username = "IOT2021"
#password = "Mima2021@)@!"
#token = ""





testbase.login()
testbase.getAll('catalog')
testbase.deleteByID('catalog','ALL')
testbase.deleteByID('business','ALL')
testbase.getAll('catalog')
testbase.update('business',{"uid":"common","s_name":"通用"})
testbase.update('catalog',{"uid":"root","s_name":"通用","business_id":"common"})
u1=str(uuid.uuid4())
testbase.update('catalog',{"uid":u1,"s_name":"test","business_id":"common","parent_id":"root"})
testbase.update('catalog',{"s_name":"test-child","business_id":"common","parent_id":u1})
testbase.update('catalog',{"s_name":"test-child2","business_id":"common","parent_id":u1})
testbase.update('catalog',{"s_name":"test-22","business_id":"common","parent_id":"root"})
testbase.update('catalog',{"uid":u1,"sname":"test-new-name","business_id":"common","parent_id":"root"})
testbase.getAll('catalog')
testbase.getByID('catalog',u1)
testbase.deleteByID('catalog','ALL')
testbase.getAll('catalog')
